//
//  UUIntentOrderModel.m
//  UUCharterSupplier
//
//  Created by ZhangAo on 28/02/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import "UUIntentOrderModel.h"

@implementation UUIntentOrderBidModel

@end

@implementation UUIntentOrderModel

- (instancetype)init {
    self = [super init];
    if (self) {
        [self addManualMappingDict:@{
                                     @"busNum" : @"carNum",
                                     @"busCategoryId" : @"carCategoryId",
                                     }];
    }
    return self;
}

@end

@implementation UUIntentOrderDetailModel

- (instancetype)init {
    self = [super init];
    if (self) {
        [self addManualMappingDict:@{
                                     @"vendorId" : @"supplierId"
                                     }];
    }
    return self;
}

- (Class)classAtInsideOfObjectWithProperty:(NSString *)propertyName {
    if ([propertyName isEqualToString:@"bids"]) {
        return [UUIntentOrderBidModel class];
    } else {
        return [super classAtInsideOfObjectWithProperty:propertyName];
    }
}

@end

@implementation UUIntentOrderHistoryModel

+ (BOOL)isContainParent {
    return YES;
}

+ (NSString *)getPrimaryKey {
    return @"id";
}

@end
